home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / program / tcpdumpb.zip / libpcap / Makefile < prev    next >
Makefile  |  1997-02-15  |  5KB  |  158 lines

  1. # Generated automatically from Makefile.in by configure.
  2. #  Copyright (c) 1993, 1994, 1995, 1996
  3. #     The Regents of the University of California.  All rights reserved.
  4. #
  5. #  Redistribution and use in source and binary forms, with or without
  6. #  modification, are permitted provided that: (1) source code distributions
  7. #  retain the above copyright notice and this paragraph in its entirety, (2)
  8. #  distributions including binary code include the above copyright notice and
  9. #  this paragraph in its entirety in the documentation or other materials
  10. #  provided with the distribution, and (3) all advertising materials mentioning
  11. #  features or use of this software display the following acknowledgement:
  12. #  ``This product includes software developed by the University of California,
  13. #  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  14. #  the University nor the names of its contributors may be used to endorse
  15. #  or promote products derived from this software without specific prior
  16. #  written permission.
  17. #  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  18. #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  19. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  20. #
  21. # @(#) $Header: Makefile.in,v 1.67 96/07/23 22:59:40 leres Exp $ (LBL)
  22.  
  23. #
  24. # Various configurable paths (remember to edit Makefile.in, not Makefile)
  25. #
  26.  
  27. # Top level hierarchy
  28. prefix = /usr/local
  29. exec_prefix = ${prefix}
  30. # Pathname of directory to install the include files
  31. INCLDEST = ${prefix}/include
  32. # Pathname of directory to install the library
  33. LIBDEST =  ${exec_prefix}/lib
  34. # Pathname of directory to install the man page
  35. MANDEST = ${prefix}/man
  36.  
  37. #
  38. # You shouldn't need to edit anything below.
  39. #
  40.  
  41. CC = gcc
  42. CCOPT = -O4
  43. INCLS = -I. 
  44. DEFS = 
  45.  -DHAVE_MALLOC_H=1
  46.  -DHAVE_SYS_SOCKIO_H=1
  47.  -DHAVE_STRERROR=1
  48.  -DLBL_ALIGN=1
  49.  
  50.  
  51. # Standard CFLAGS
  52. CFLAGS = $(CCOPT) $(INCLS) $(DEFS) -include /emx/include/sys/types.h -include /emx/include/sys/so_ioctl.h
  53.  
  54. INSTALL = ./install-sh -c
  55. RANLIB = ar s
  56.  
  57. #
  58. # Flex and bison allow you to specify the prefixes of the global symbols
  59. # used by the generated parser.  This allows programs to use lex/yacc
  60. # and link against libpcap.  If you don't have flex or bison, get them.
  61. #
  62. LEX = flex
  63. YACC = bison
  64.  
  65. # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  66. # Also, gcc does not remove the .o before forking 'as', which can be a
  67. # problem if you don't own the file but can write to the directory.
  68. .c.o:
  69.     @rm -f $@
  70.     $(CC) $(CFLAGS) -c $*.c
  71.  
  72. PSRC =    pcap-spy.c
  73. CSRC =    pcap.c inet.c gencode.c optimize.c nametoaddr.c \
  74.     etherent.c savefile.c bpf_filter.c bpf_image.c
  75. GENSRC = scanner.c grammar.c
  76.  
  77. SRC =    $(PSRC) $(CSRC) $(GENSRC)
  78.  
  79. # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
  80. # hack the extra indirection
  81. OBJ =    $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o)
  82. HDR =    pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
  83.     ethertype.h gencode.h gnuc.h
  84. GENHDR = \
  85.     tokdefs.h
  86.  
  87. TAGHDR = \
  88.     bpf/net/bpf.h
  89.  
  90. TAGFILES = \
  91.     $(SRC) $(HDR) $(TAGHDR)
  92.  
  93. CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
  94.  
  95. libpcap.a: $(OBJ)
  96.     rm -f libpcap.a
  97.     ar rc $@ $(OBJ)
  98.     $(RANLIB) $@
  99.  
  100. scanner.c: scanner.l
  101.     rm -f $@
  102.     $(LEX) -t $< > $$$$.$@
  103.     mv $$$$.$@ $@
  104.  
  105. scanner.o: scanner.c tokdefs.h
  106.     rm -f $@
  107.     $(CC) $(CFLAGS) -c $*.c
  108.  
  109. tokdefs.h: grammar.c
  110. grammar.c: grammar.y
  111.     rm -f grammar.c tokdefs.h
  112.     $(YACC) -d $<
  113.     mv grammar.tab.c grammar.c
  114.     mv grammar.tab.h tokdefs.h
  115.  
  116. grammar.o: grammar.c
  117.     $(CC) -c $(CFLAGS) -Dyylval=pcap_lval grammar.c
  118.  
  119. install: force
  120.     $(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)
  121.     $(RANLIB) $(DESTDIR)$(LIBDEST)/libpcap.a
  122.  
  123. install-incl: force
  124.     $(INSTALL) -m 444 -o bin -g bin pcap.h $(DESTDIR)$(INCLDEST)
  125.     $(INSTALL) -m 444 -o bin -g bin pcap-namedb.h $(DESTDIR)$(INCLDEST)
  126.     $(INSTALL) -m 444 -o bin -g bin net/bpf.h $(DESTDIR)$(INCLDEST)/net
  127.  
  128. install-man: force
  129.     $(INSTALL) -m 444 -o bin -g bin pcap.3 $(DESTDIR)$(MANDEST)/man3
  130.  
  131. clean:
  132.     rm -f $(CLEANFILES)
  133.  
  134. distclean:
  135.     rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
  136.         gnuc.h os-proto.h bpf_filter.c net
  137.  
  138. tags: $(TAGFILES)
  139.     ctags -wtd $(TAGFILES)
  140.  
  141. tar:    force
  142.     @cwd=`pwd` ; dir=`basename $$cwd` ; name=libpcap-`cat VERSION` ; \
  143.         list="" ; tar="tar chFFf" ; \
  144.         for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
  145.         echo \
  146.         "rm -f ../$$name; ln -s $$dir ../$$name" ; \
  147.          rm -f ../$$name; ln -s $$dir ../$$name ; \
  148.         echo \
  149.         "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
  150.          (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
  151.         echo \
  152.         "rm -f ../$$name" ; \
  153.          rm -f ../$$name
  154.  
  155. force:    /tmp
  156. depend:    $(GENSRC) force
  157.     ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
  158.